<template>
  <div style="width:100%; height:100%">
    <iframe
      :name="tabItem.tabName || ''"
      :src="'/#' + tabItem.path + (tabItem.params ? '?params=' + tabItem.params + '&time=' + new Date().getTime() + '&name=' : '')"
      frameborder="0"
      :style="{width: '100%',height:'100%'}"
    />
  </div>
</template>

<script>
export default {
  name: 'Iframe',
  props: {
    tabItem: {
      type: Object,
      required: true,
      default() {
        return {}
      }
    },
    tabList: {
      type: Array,
      required: true,
      default() {
        return []
      }
    },
    tabIndex: {
      type: Number,
      required: true,
      default: 0
    }
  },
  mounted() {
    const iframe = this.$refs[this.tabItem.tabName]
    console.log('222222', iframe, this.tabList, this.tabItem)
  }
}
</script>

<style lang="scss" scoped>
</style>
